import java.util.Stack;

public class Test {
    public static void main(String[] args) {

    }
    public static void main2(String[] args) {
        MyStack2<Integer> myStack2=new MyStack2<>();
        myStack2.push(9);
        myStack2.push(8);
        myStack2.push(7);

        System.out.println(myStack2.pop());
        System.out.println(myStack2.peek());
        System.out.println(myStack2.peek());
    }
    public static void main11(String[] args) {
        MyStack myStack=new MyStack();
        myStack.push(1);
        myStack.push(2);
        myStack.push(3);

        System.out.println(myStack.pop());
        System.out.println(myStack.peek());
        System.out.println(myStack.peek());
    }
    public static void main1(String[] args) {
        Stack<Integer> stack=new Stack<>();
        //入栈
        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.push(4);
        //出栈
        Integer x=stack.pop();
        System.out.println(x);

        //peek
        Integer y1=stack.peek();
        System.out.println(y1);

        Integer y2=stack.peek();
        System.out.println(y2);
    }
}
